﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GreatB2C.Config.SiteInfo
{
    public class SMSConfig
    {
        #region 手机短信配置
        /// <summary>
        /// 短信通的用户名
        /// </summary>
        public static string UserName
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "UserName" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "UserName" , value );
            }
        }

        /// <summary>
        /// MD5密钥
        /// </summary>
        public static string MD5Key
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "MD5Key" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "MD5Key" , value );
            }
        }

        /// <summary>
        /// 客户提交订单时，系统是否自动发送手机短信通知管理员
        /// </summary>
        public static string IsAutoSend
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "IsAutoSend" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "IsAutoSend" , value );
            }
        }

        /// <summary>
        /// 管理员的小灵通或手机号码
        /// </summary>
        public static string AdminPhoneNumber
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "AdminPhoneNumber" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "AdminPhoneNumber" , value );
            }
        }

        /// <summary>
        /// 客户下订单时系统给管理员发送短信的内容
        /// </summary>
        public static string OrderMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "OrderMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "OrderMessage" , value );
            }
        }

        /// <summary>
        /// 客户在线支付成功后是否给客户发送手机短信，告知其卡号和密码
        /// </summary>
        public static string IsAutoSendCardNumber
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "IsAutoSendCardNumber" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "IsAutoSendCardNumber" , value );
            }
        }

        /// <summary>
        /// 确认订单时手机短信通知内容
        /// </summary>
        public static string ConfirmOrderMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "ConfirmOrderMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "ConfirmOrderMessage" , value );
            }
        }

        /// <summary>
        /// 收到银行汇款后手机短信通知内容
        /// </summary>
        public static string RemitMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "RemitMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "RemitMessage" , value );
            }
        }

        /// <summary>
        /// 退款后手机短信通知内容
        /// </summary>
        public static string RefundmentMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "RefundmentMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "RefundmentMessage" , value );
            }
        }

        /// <summary>
        /// 开发票后手机短信通知内容
        /// </summary>
        public static string InvoiceMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "InvoiceMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "InvoiceMessage" , value );
            }
        }

        /// <summary>
        /// 发出货物后手机短信通知内容
        /// </summary>
        public static string ConsignmentMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "ConsignmentMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "ConsignmentMessage" , value );
            }
        }

        /// <summary>
        /// 发送卡号后手机短信通知内容
        /// </summary>
        public static string SendCardNumberMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "SendCardNumberMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "SendCardNumberMessage" , value );
            }
        }

        /// <summary>
        /// 通知内容中的可用标签及含义
        /// </summary>
        public static string UseLabel
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "UseLabel" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "UseLabel" , value );
            }
        }

        /// <summary>
        /// 购物车管理手机催单短信通知内容
        /// </summary>
        public static string CartInformMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "CartInformMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "CartInformMessage" , value );
            }
        }

        /// <summary>
        /// 给会员添加银行汇款记录时发送的手机短信内容
        /// </summary>
        public static string BankLogMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "BankLogMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "BankLogMessage" , value );
            }
        }

        /// <summary>
        /// 给会员添加其他收入记录时发送的手机短信内容
        /// </summary>
        public static string IncomeLogMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "IncomeLogMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "IncomeLogMessage" , value );
            }
        }

        /// <summary>
        /// 给会员添加支出记录时发送的手机短信内容
        /// </summary>
        public static string PayoutLogMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "PayoutLogMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "PayoutLogMessage" , value );
            }
        }

        /// <summary>
        /// 给会员兑换点券时发送的手机短信内容
        /// </summary>
        public static string ExchangePointMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "ExchangePointMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "ExchangePointMessage" , value );
            }
        }

        /// <summary>
        /// 给会员奖励点券时发送的手机短信内容
        /// </summary>
        public static string EncouragePointMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "EncouragePointMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "EncouragePointMessage" , value );
            }
        }

        /// <summary>
        /// 给会员扣除点券时发送的手机短信内容
        /// </summary>
        public static string PayoutPointMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "PayoutPointMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "PayoutPointMessage" , value );
            }
        }

        /// <summary>
        /// 给会员兑换有效期时发送的手机短信内容
        /// </summary>
        public static string ExchangePeriodMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "ExchangePeriodMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "ExchangePeriodMessage" , value );
            }
        }

        /// <summary>
        /// 给会员奖励有效期时发送的手机短信内容
        /// </summary>
        public static string EncouragePeriodMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "EncouragePeriodMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "EncouragePeriodMessage" , value );
            }
        }

        /// <summary>
        /// 给会员扣除有效期时发送的手机短信内容
        /// </summary>
        public static string PayoutPeriodMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "PayoutPeriodMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "PayoutPeriodMessage" , value );
            }
        }

        /// <summary>
        /// 给会员派送优惠劵时发送的手机短信内容
        /// </summary>
        public static string CouponMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "CouponMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "CouponMessage" , value );
            }
        }

        /// <summary>
        /// 管理员审核信息后是否发送手机短信告知会员
        /// </summary>
        public static string IsAutoSendStateMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "IsAutoSendStateMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "IsAutoSendStateMessage" , value );
            }
        }

        /// <summary>
        /// 确认审核时发送的手机短信内容
        /// </summary>
        public static string ChangeStateMessage
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "ChangeStateMessage" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "ChangeStateMessage" , value );
            }
        }

        /// <summary>
        /// 缺货登记补货手机短信内容
        /// </summary>
        public static string OutOfLogSmsConfig
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.SMS , "OutOfLogSmsConfig" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.SMS , "OutOfLogSmsConfig" , value );
            }
        }

        public static bool Config( string UserName , string MD5Key , string IsAutoSend , string AdminPhoneNumber
            , string OrderMessage , string IsAutoSendCardNumber , string ConfirmOrderMessage , string RemitMessage
            , string RefundmentMessage , string InvoiceMessage , string ConsignmentMessage , string SendCardNumberMessage
            , string UseLabel , string CartInformMessage , string BankLogMessage , string IncomeLogMessage
            , string PayoutLogMessage , string ExchangePointMessage , string EncouragePointMessage , string PayoutPointMessage
            , string ExchangePeriodMessage , string EncouragePeriodMessage , string PayoutPeriodMessage , string CouponMessage
            , string IsAutoSendStateMessage , string ChangeStateMessage , string OutOfLogSmsConfig )
        {
            Dictionary<string , string> dicts = new Dictionary<string , string>( );

            dicts.Add( "UserName" , UserName );
            dicts.Add( "MD5Key" , MD5Key );
            dicts.Add( "IsAutoSend" , IsAutoSend );
            dicts.Add( "AdminPhoneNumber" , AdminPhoneNumber );
            dicts.Add( "OrderMessage" , OrderMessage );
            dicts.Add( "IsAutoSendCardNumber" , IsAutoSendCardNumber );
            dicts.Add( "ConfirmOrderMessage" , ConfirmOrderMessage );
            dicts.Add( "RemitMessage" , RemitMessage );
            dicts.Add( "RefundmentMessage" , RefundmentMessage );
            dicts.Add( "InvoiceMessage" , InvoiceMessage );
            dicts.Add( "ConsignmentMessage" , ConsignmentMessage );
            dicts.Add( "SendCardNumberMessage" , SendCardNumberMessage );
            dicts.Add( "UseLabel" , UseLabel );
            dicts.Add( "CartInformMessage" , CartInformMessage );
            dicts.Add( "BankLogMessage" , BankLogMessage );
            dicts.Add( "IncomeLogMessage" , IncomeLogMessage );
            dicts.Add( "PayoutLogMessage" , PayoutLogMessage );
            dicts.Add( "ExchangePointMessage" , ExchangePointMessage );
            dicts.Add( "EncouragePointMessage" , EncouragePointMessage );
            dicts.Add( "PayoutPointMessage" , PayoutPointMessage );
            dicts.Add( "ExchangePeriodMessage" , ExchangePeriodMessage );
            dicts.Add( "EncouragePeriodMessage" , EncouragePeriodMessage );
            dicts.Add( "PayoutPeriodMessage" , PayoutPeriodMessage );
            dicts.Add( "CouponMessage" , CouponMessage );
            dicts.Add( "IsAutoSendStateMessage" , IsAutoSendStateMessage );
            dicts.Add( "ChangeStateMessage" , ChangeStateMessage );
            dicts.Add( "OutOfLogSmsConfig" , OutOfLogSmsConfig );

            return BaseConfig.SetConfigForBatch( BaseConfig.eConfigs.SMS , dicts );
        }
        #endregion
    }
}
